package com.chenfwind.serviceImpl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chenfwind.IDao.User1Mapper;
import com.chenfwind.domain.User1;
import com.chenfwind.service.User1Service;  
  
@Service("user1Service")  
public class User1ServiceImpl implements User1Service {  
	@Autowired  
    private User1Mapper user1Dao;  
    
    @Transactional
    public User1 getUserById(int userId) {  
        // TODO Auto-generated method stub  
//    	User user = new User();
//    	user.setAge(1);
//    	user.setUserName("ddd");
//    	user.setId(userId);
//    	return user;
        return this.user1Dao.selectByPrimaryKey(userId);  
    }

	public User1Mapper getUser1Dao() {
		return user1Dao;
	}

	public void setUser1Dao(User1Mapper user1Dao) {
		this.user1Dao = user1Dao;
	}  
  
    
}  